<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<p id="time"></p>
<body>
<script>
     var hour=0;
     var min=0;
     var second=0;
     setInterval(function () {
          if(second >=59){
              min+=1;
              second=0;
          }else{
               second+=1;
          }
         if(min >=59){
             hour+=1;
             min=0;
         }
          document.getElementById('time').innerHTML=jude(hour)+':'+jude(min)+':'+jude(second)
     },1000)

    function jude(time) {
           if(time>=10){
               return time;
           }else{
               return '0'+time;
           }
    }
</script>
</body>
</html>